package com.x.client.bean

import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize

@Parcelize
data class Market(
        @SerializedName("cityId") var cityId: String? = "", //1
        @SerializedName("marketCode") var marketCode: String? = "", //1
        @SerializedName("marketCreateTime") var marketCreateTime: String? = "", //1
        @SerializedName("marketMobile") var marketMobile: String? = "", //1
        @SerializedName("marketParentId") var marketParentId: String? = "", //1
        @SerializedName("marketShortName") var marketShortName: String? = "", //1
        @SerializedName("marketUpdateTime") var marketUpdateTime: String? = "", //1
        @SerializedName("provinceId") var provinceId: String? = "", //1
        @SerializedName("marketName") var marketName: String? = "", //总部
        @SerializedName("marketId") var marketId: String? = "", //总部
        @SerializedName("city") var city: City? = null, //总部
        var isSelect: Boolean = false
) : Parcelable {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as Market

        if (marketId != other.marketId) return false

        return true
    }

    override fun hashCode(): Int {
        return marketId?.hashCode() ?: 0
    }
}